package com.bjsdzk.collector.entity;


/**
 * @Author：cc.
 * @Date：Created in 10:37 2020-05-15
 * @Description：
 * @Version:1.0
 */
public enum MandunDataTypeEnum {

    ECVOL("EC", "signal", 200),

    E0VOL("E0", "vol", 229),
    E0PWR("E0", "pwr", 19),
    E0TMP("E0", "tmp", 230),
    E0CUR("E0", "cur", 228),
    E0AFTCUR("E0", "lki", 63),
    E0PS("E0", "ps", 4),
    E0TMP2("E0", "tmp2", 231),

    E80VOL("80", "vol", 229),
    E80PWR("80", "pwr", 19),
    E80TMP("80", "tmp", 230),
    E80CUR("80", "cur", 228),
    E80AFTCUR("80", "lki", 63),
    E80PS("80", "ps", 4),
//    E80TMP2("80", "tmp2", 231),
    E80SWITCHSTATUS("80", "switchStatus", 205),

    E4AFTCUR("E4", "lki", 63),
    E4PS("E4", "ps", 4),
    E4TMP("E4", "tmp", 231),
    E4PWR("E4", "pwr", 19),

    E84AFTCUR("84", "lki", 63),
    E84PS("84", "ps", 4),
    E84TMP("84", "tmp", 231),
    E84PWR("84", "pwr", 19),
    E84SWITCHSTATUS("84", "switchStatus", 205),

    E5VOL("E5", "vol", 9),
    E5PWR("E5", "pwr", 16),
    E5TMP("E5", "tmp", 130),
    E5CUR("E5", "cur", 12),
//    E5PS("E5", "ps", 4),

    E85VOL("85", "vol", 9),
    E85PWR("85", "pwr", 16),
    E85TMP("85", "tmp", 130),
    E85CUR("85", "cur", 12),

    E6VOL("E6", "vol", 10),
    E6PWR("E6", "pwr", 17),
    E6TMP("E6", "tmp", 131),
    E6CUR("E6", "cur", 13),
//    E6PS("E6", "ps", 4),

    E86VOL("86", "vol", 10),
    E86PWR("86", "pwr", 17),
    E86TMP("86", "tmp", 131),
    E86CUR("86", "cur", 13),

    E7VOL("E7", "vol", 11),
    E7PWR("E7", "pwr", 18),
    E7TMP("E7", "tmp", 132),
    E7CUR("E7", "cur", 14),
//    E7PS("E7", "ps", 4),

    E87VOL("87", "vol", 11),
    E87PWR("87", "pwr", 18),
    E87TMP("87", "tmp", 132),
    E87CUR("87", "cur", 14),
    ;

    private String type;
    private String item;
    private Integer code;

    MandunDataTypeEnum(String type, String item, Integer code) {
        this.type = type;
        this.item = item;
        this.code = code;
    }

    public static int getByTypeAndItem(String type, String item) {
        MandunDataTypeEnum[] values = MandunDataTypeEnum.values();
        for (MandunDataTypeEnum value : values) {
            if (value.type.equals(type)
                    && value.item.equals(item)) {
                return value.code;
            }
        }
        return 0;
    }
}
